package com.extend_;

public class Pupil {
    public String name;
    public int age;
    private double score;

    public Pupil() {
        System.out.println("父类构造器被调用");
    }

    private Pupil(String name) {
        System.out.println("Pupil(String name)");
    }

    public void setScore(double score) {
        this.score = score;
    }

    public double getScore() {
        return score;
    }

    private void testing() {
        System.out.println("私有方法被访问");
    }
    public void gettest(){
        this.testing();
    }

    @Override
    public String toString() {
        return "Pupil{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", score=" + score +
                '}';
    }
}
